<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
    
  <meta name="description" content="林湃滨的个人博客" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <title>
    IDEA 快捷键大全 |  滨书
  </title>
  <meta name="generator" content="hexo-theme-yilia-plus">
  
  <link rel="shortcut icon" href="/favicon.ico" />
  
  
<link rel="stylesheet" href="/css/style.css">

  
<script src="/js/pace.min.js"></script>


  

  

<link rel="alternate" href="/atom.xml" title="滨书" type="application/atom+xml">
</head>

</html>

<body>
  <div id="app">
    <main class="content">
      <section class="outer">
  <article id="post-IdeaTools/IDEA-快捷键大全" class="article article-type-post" itemscope
  itemprop="blogPost" data-scroll-reveal>

  <div class="article-inner">
    
    <header class="article-header">
       
<h1 class="article-title sea-center" style="border-left:0" itemprop="name">
  IDEA 快捷键大全
</h1>
  

    </header>
    

    
    <div class="article-meta">
      <a href="/2019/12/07/IdeaTools/IDEA-%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%A4%A7%E5%85%A8/" class="article-date">
  <time datetime="2019-12-07T14:03:15.000Z" itemprop="datePublished">2019-12-07</time>
</a>
      
      
      
<div class="word_count">
    <span class="post-time">
        <span class="post-meta-item-icon">
            <i class="ri-quill-pen-line"></i>
            <span class="post-meta-item-text"> 字数统计:</span>
            <span class="post-count">907字</span>
        </span>
    </span>

    <span class="post-time">
        &nbsp; | &nbsp;
        <span class="post-meta-item-icon">
            <i class="ri-book-open-line"></i>
            <span class="post-meta-item-text"> 阅读时长≈</span>
            <span class="post-count">3分钟</span>
        </span>
    </span>
</div>

      
    </div>
    

    
    
    <div class="tocbot"></div>





    

    <div class="article-entry" itemprop="articleBody">
      


      

      
      <p>[toc]</p>
<h2 id="常用快捷键"><a href="#常用快捷键" class="headerlink" title="常用快捷键"></a>常用快捷键</h2><blockquote>
<p>Ctrl + Shift + A 快捷键可以查找 Intellij 的所有命令，且有带有其快捷键信息，可谓一大神键，也适合我们了解、学习快捷键的工具。</p>
</blockquote>
<h3 id="自动代码快捷键"><a href="#自动代码快捷键" class="headerlink" title="自动代码快捷键"></a>自动代码快捷键</h3><table>
<thead>
<tr>
<th align="center">快捷键（括号内为笔记解释）</th>
<th align="center">含义</th>
</tr>
</thead>
<tbody><tr>
<td align="center">Ctrl + Alt + O</td>
<td align="center">优化导入的类和包</td>
</tr>
<tr>
<td align="center">Alt + Insert</td>
<td align="center">生成代码(如get,set方法,构造函数等)</td>
</tr>
<tr>
<td align="center">fori/sout/psvm + Tab</td>
<td align="center">快捷生成 循环/输出/main函数</td>
</tr>
<tr>
<td align="center">Ctrl+Alt+T</td>
<td align="center">生成try catch</td>
</tr>
<tr>
<td align="center">Ctrl + O （Override）</td>
<td align="center">重写方法</td>
</tr>
<tr>
<td align="center">Ctrl + I （Implement）</td>
<td align="center">实现方法</td>
</tr>
<tr>
<td align="center">Ctr+shift+U</td>
<td align="center">大小写转化</td>
</tr>
<tr>
<td align="center">ALT+回车</td>
<td align="center">导入包，自动改正</td>
</tr>
<tr>
<td align="center">ALT + /</td>
<td align="center">代码提示（对应Eclipse）</td>
</tr>
<tr>
<td align="center">Ctrl + J</td>
<td align="center">自动代码</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + J</td>
<td align="center">整合两行为一行</td>
</tr>
<tr>
<td align="center">Ctrl + space</td>
<td align="center">代码提示</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + space</td>
<td align="center">自动补全代码</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + L</td>
<td align="center">格式化代码</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + I</td>
<td align="center">自动缩进</td>
</tr>
<tr>
<td align="center">Ctrl + E</td>
<td align="center">查看最近更改的代码</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + space</td>
<td align="center">类名或接口名提示</td>
</tr>
<tr>
<td align="center">Ctrl + P</td>
<td align="center">方法参数提示</td>
</tr>
<tr>
<td align="center">Ctrl + Q</td>
<td align="center">可以看到当前方法的声明</td>
</tr>
<tr>
<td align="center">Shift + F6</td>
<td align="center">重构-重命名（包、类、方法、变量、注释等）</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + V</td>
<td align="center">提取变量</td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
</tbody></table>
<h3 id="查询快捷键"><a href="#查询快捷键" class="headerlink" title="查询快捷键"></a>查询快捷键</h3><table>
<thead>
<tr>
<th align="center">快捷键</th>
<th align="center">含义</th>
</tr>
</thead>
<tbody><tr>
<td align="center">Ctrl + Shift + Backspace</td>
<td align="center">跳转到上次编辑的地方</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + Left/Right</td>
<td align="center">前后导航编辑过的地方</td>
</tr>
<tr>
<td align="center">Alt + 7</td>
<td align="center">靠左窗口显示当前文件的结构</td>
</tr>
<tr>
<td align="center">Ctrl + F12</td>
<td align="center">浮动显示当前文件的结构</td>
</tr>
<tr>
<td align="center">Alt + F7</td>
<td align="center">找到你的函数/变量/类的所有引用到的地方</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + F7</td>
<td align="center">找到你的函数/变量/类的所有引用到的地方</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + Alt + N</td>
<td align="center">查找类中的方法或者变量</td>
</tr>
<tr>
<td align="center">double Shift</td>
<td align="center">在项目中的所有目录查找文件</td>
</tr>
<tr>
<td align="center">Ctrl + N</td>
<td align="center">查找类</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + N</td>
<td align="center">查找文件</td>
</tr>
<tr>
<td align="center">Ctrl + G</td>
<td align="center">定位行</td>
</tr>
<tr>
<td align="center">Ctrl + F</td>
<td align="center">在当前窗口查找文本</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + F</td>
<td align="center">在指定窗口查找文本</td>
</tr>
<tr>
<td align="center">Ctrl + R</td>
<td align="center">当前窗口口替换文本</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + R</td>
<td align="center">在指定窗口替换文本</td>
</tr>
<tr>
<td align="center">Alt + Shift + C</td>
<td align="center">查找修改的文本</td>
</tr>
<tr>
<td align="center">Ctrl + E</td>
<td align="center">最近打开的文件</td>
</tr>
<tr>
<td align="center">F3</td>
<td align="center">向下查找关键字出现的位置</td>
</tr>
<tr>
<td align="center">Shift + F3</td>
<td align="center">向上查找关键字出现的位置</td>
</tr>
<tr>
<td align="center">F4</td>
<td align="center">查找变量来源</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + O</td>
<td align="center">弹出显示查找内容</td>
</tr>
<tr>
<td align="center">Ctrl + W</td>
<td align="center">选中代码（连续按会有其他效果）</td>
</tr>
<tr>
<td align="center">F2 / Shift + F2</td>
<td align="center">高亮error/warning快速定位</td>
</tr>
<tr>
<td align="center">Ctrl + UP/Down</td>
<td align="center">光标跳转到第一行或最后一行下</td>
</tr>
<tr>
<td align="center">Ctrl + B</td>
<td align="center">快速打开光标处的类或者方法</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + B</td>
<td align="center">查找所有的子类</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + B</td>
<td align="center">查找变量的类</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + Left/Right</td>
<td align="center">返回到上次浏览过的位置</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + Up/Down</td>
<td align="center">上下移动代码</td>
</tr>
<tr>
<td align="center">Ctrl + X</td>
<td align="center">删除行</td>
</tr>
<tr>
<td align="center">Ctrl + D</td>
<td align="center">复制行</td>
</tr>
<tr>
<td align="center">Ctrl + H</td>
<td align="center">显示类结构图</td>
</tr>
<tr>
<td align="center">Ctrl + Q</td>
<td align="center">显示注释文档</td>
</tr>
<tr>
<td align="center">Alt + F1</td>
<td align="center">查找代码所在位置</td>
</tr>
<tr>
<td align="center">Alt + 1</td>
<td align="center">快速打开或隐藏工程面板</td>
</tr>
<tr>
<td align="center">Alt + Left/Right</td>
<td align="center">切换代码视图</td>
</tr>
<tr>
<td align="center">Alt + Up/Down</td>
<td align="center">在方法之间快速移动定位</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + Left/Right</td>
<td align="center">前后导航编辑过的地方</td>
</tr>
<tr>
<td align="center">Alt + 6</td>
<td align="center">查找TODO</td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
<tr>
<td align="center"></td>
<td align="center"></td>
</tr>
</tbody></table>
<h3 id="其他快捷键"><a href="#其他快捷键" class="headerlink" title="其他快捷键"></a>其他快捷键</h3><table>
<thead>
<tr>
<th align="center">快捷键</th>
<th align="center">含义</th>
</tr>
</thead>
<tbody><tr>
<td align="center">Shift + Enter</td>
<td align="center">另起一行</td>
</tr>
<tr>
<td align="center">Ctrl + Shift + Z</td>
<td align="center">取消之前的撤销操作</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + F12</td>
<td align="center">资源管理器打开文件夹</td>
</tr>
<tr>
<td align="center">Alt + F1</td>
<td align="center">查找文件所在目录位置</td>
</tr>
<tr>
<td align="center">Shift + Alt + Insert</td>
<td align="center">竖编辑模式</td>
</tr>
<tr>
<td align="center">Ctrl + F4</td>
<td align="center">关闭当前窗口</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + V</td>
<td align="center">自动导入变量定义</td>
</tr>
<tr>
<td align="center">Ctrl + ~</td>
<td align="center">快速切换方案（如界面外观、代码风格、快捷键映射等）</td>
</tr>
</tbody></table>
<h3 id="调试快捷键"><a href="#调试快捷键" class="headerlink" title="调试快捷键"></a>调试快捷键</h3><table>
<thead>
<tr>
<th align="center">快捷键</th>
<th align="center">含义</th>
</tr>
</thead>
<tbody><tr>
<td align="center">Alt + F8</td>
<td align="center">debug时选中，查看值</td>
</tr>
<tr>
<td align="center">Alt + F9</td>
<td align="center">运行至光标处</td>
</tr>
<tr>
<td align="center">F9</td>
<td align="center">恢复程序</td>
</tr>
<tr>
<td align="center">Alt+F10</td>
<td align="center">定位到断点</td>
</tr>
</tbody></table>
<h3 id="重构快捷键"><a href="#重构快捷键" class="headerlink" title="重构快捷键"></a>重构快捷键</h3><table>
<thead>
<tr>
<th align="center">快捷键</th>
<th align="center">含义</th>
</tr>
</thead>
<tbody><tr>
<td align="center">Ctrl + Alt + Shift + T</td>
<td align="center">弹出重构菜单</td>
</tr>
<tr>
<td align="center">Shift+F6</td>
<td align="center">重命名</td>
</tr>
<tr>
<td align="center">Alt + Delete</td>
<td align="center">安全删除</td>
</tr>
<tr>
<td align="center">Ctrl + Alt + N</td>
<td align="center">内联</td>
</tr>
</tbody></table>

      
      <!-- reward -->
      
      <div id="reward-btn">
        打赏
      </div>
      
    </div>
      <!-- copyright -->
      
        <div class="declare">
          <ul class="post-copyright">
            <li>
              <i class="ri-copyright-line"></i>
              <strong>版权声明： </strong s>
              本博客所有文章除特别声明外，均采用 <a href="https://www.apache.org/licenses/LICENSE-2.0.html" rel="external nofollow"
                target="_blank">Apache License 2.0</a> 许可协议。转载请注明出处！
            </li>
          </ul>
        </div>
        
    <footer class="article-footer">
      
          
<div class="share-btn">
      <span class="share-sns share-outer">
        <i class="ri-share-forward-line"></i>
        分享
      </span>
      <div class="share-wrap">
        <i class="arrow"></i>
        <div class="share-icons">
          
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="ri-weibo-fill"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="ri-wechat-fill"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="ri-qq-fill"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="ri-douban-line"></i>
          </a>
          <!-- <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a> -->
          
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="ri-facebook-circle-fill"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="ri-twitter-fill"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="ri-google-fill"></i>
          </a>
        </div>
      </div>
</div>

<div class="wx-share-modal">
    <a class="modal-close" href="javascript:;"><i class="ri-close-circle-line"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://linpaibin.gitee.io/2019/12/07/IdeaTools/IDEA-%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%A4%A7%E5%85%A8/" alt="微信分享二维码">
    </div>
</div>

<div id="share-mask"></div>
      
      
  <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/IDEA/" rel="tag">IDEA</a></li></ul>


    </footer>

  </div>

  
  
  <nav class="article-nav">
    
      <a href="/2019/12/14/docker/%E5%BF%AB%E9%80%9F%E6%90%AD%E5%BB%BAdocker%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%8E%AF%E5%A2%83%E5%B9%B6%E8%BF%9B%E8%A1%8C%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/" class="article-nav-link">
        <strong class="article-nav-caption">上一篇</strong>
        <div class="article-nav-title">
          
            快速搭建docker服务器环境并进行项目部署
          
        </div>
      </a>
    
    
      <a href="/2019/12/02/AboutMe/" class="article-nav-link">
        <strong class="article-nav-caption">下一篇</strong>
        <div class="article-nav-title">AboutMe</div>
      </a>
    
  </nav>


  

  
  
<!-- valine评论 -->
<div id="vcomments-box">
    <div id="vcomments">
    </div>
</div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src='https://cdn.jsdelivr.net/npm/valine@1.3.10/dist/Valine.min.js'></script>
<script>
    new Valine({
        el: '#vcomments',
        notify: false,
        verify: '',
        app_id: 'gtXNe43HVDH72a7XMn9zNgz8-gzGzoHsz',
        app_key: 'Df8WdcqcC2DCWL1pfcWb4QfN',
        path: window.location.pathname,
        avatar: 'mp',
        placeholder: '既然都来了，便留个爪印呗~_(¦3」∠)_',
        recordIP: true
    });
    const infoEle = document.querySelector('#vcomments .info');
    if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
        infoEle.childNodes.forEach(function (item) {
            item.parentNode.removeChild(item);
        });
    }
</script>
<style>
    #vcomments-box {
        padding: 5px 30px;
    }

    @media screen and (max-width: 800px) {
        #vcomments-box {
            padding: 5px 0px;
        }
    }

    #vcomments-box #vcomments {
        background-color: #fff;
    }

    .v .vlist .vcard .vh {
        padding-right: 20px;
    }

    .v .vlist .vcard {
        padding-left: 10px;
    }
</style>

  

  
  
  

</article>
</section>
      <footer class="footer">
  <div class="outer">
    <ul class="list-inline">
      <li>
        &copy;
        2019-2020
        LinPaiBin
      </li>
      <li>
        
          Powered by
        
        
        <a href="https://hexo.io" target="_blank">Hexo</a> Theme <a href="https://github.com/Shen-Yu/hexo-theme-ayer" target="_blank">Ayer</a>
        
      </li>
    </ul>
    <ul class="list-inline">
      <li>
        
        
        <span>
  <i>PV:<span id="busuanzi_value_page_pv"></span></i>
  <i>UV:<span id="busuanzi_value_site_uv"></span></i>
</span>
        
      </li>
      <li>
        <!-- cnzz统计 -->
        
        <script type="text/javascript" src='https://s9.cnzz.com/z_stat.php?id=1278069914&amp;web_id=1278069914'></script>
        
      </li>
    </ul>
  </div>
</footer>
    <div class="to_top">
        <div class="totop" id="totop">
  <i class="ri-arrow-up-line"></i>
</div>
      </div>
    </main>
      <aside class="sidebar">
        <button class="navbar-toggle"></button>
<nav class="navbar" style="opacity: 0.5;">
  
  <div class="logo">
    <a href="/"><img src="/images/ayer-side.svg" alt="滨书"></a>
  </div>
  
  <ul class="nav nav-main">
    
    <li class="nav-item">
      <a class="nav-item-link" href="/">主页</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/archives">归档</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/categories">分类</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags">标签</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/tags/%E7%94%9F%E6%B4%BB/">生活</a>
    </li>
    
    <li class="nav-item">
      <a class="nav-item-link" href="/2019/12/02/AboutMe">关于我</a>
    </li>
    
  </ul>
</nav>
<nav class="navbar navbar-bottom">
  
  <ul class="nav">
    <li class="nav-item">
      
      <a class="nav-item-link nav-item-search"  title="Search">
        <i class="ri-search-line"></i>
      </a>
      
      
      <a class="nav-item-link" target="_blank" href="/atom.xml" title="RSS Feed">
        <i class="ri-rss-line"></i>
      </a>
      
    </li>
  </ul>
</nav>
<div class="search-form-wrap">
  <div class="local-search local-search-plugin">
  <input type="search" id="local-search-input" class="local-search-input" placeholder="Search...">
  <div id="local-search-result" class="local-search-result"></div>
</div>
</div>
      </aside>
      <div id="mask"></div>

<!-- #reward -->
<div id="reward">
  <span class="close"><i class="ri-close-line"></i></span>
  <p class="reward-p"><i class="ri-cup-line"></i>请我喝杯咖啡吧~</p>
  <div class="reward-box">
    
    <div class="reward-item">
      <img class="reward-img" src="/images/alipay.jpg">
      <span class="reward-type">支付宝</span>
    </div>
    
    
    <div class="reward-item">
      <img class="reward-img" src="/images/wechat.jpg">
      <span class="reward-type">微信</span>
    </div>
    
  </div>
</div>
      
<script src="/js/jquery-2.0.3.min.js"></script>


<script src="/js/jquery.justifiedGallery.min.js"></script>


<script src="/js/lazyload.min.js"></script>


<script src="/js/busuanzi-2.3.pure.min.js"></script>


<script src="/js/share.js"></script>



<script src="/fancybox/jquery.fancybox.min.js"></script>




<script>
  try {
    var typed = new Typed("#subtitle", {
    strings: ['人生如棋，吾愿为卒','愿你一生努力，一生无憾','不求事事顺意，但求无愧于心'],
    startDelay: 0,
    typeSpeed: 250,
    loop: true,
    backSpeed: 100,
    showCursor: true
    });
  } catch (err) {
  }
  
</script>




<script src="/js/tocbot.min.js"></script>

<script>
  // Tocbot_v4.7.0  http://tscanlin.github.io/tocbot/
  tocbot.init({
    tocSelector: '.tocbot',
    contentSelector: '.article-entry',
    headingSelector: 'h1, h2, h3, h4, h5, h6',
    hasInnerContainers: true,
    scrollSmooth: true,
    scrollContainer:'main',
    positionFixedSelector: '.tocbot',
    positionFixedClass: 'is-position-fixed',
    fixedSidebarOffset: 'auto',
    onClick: (e) => {
      $('.toc-link').removeClass('is-active-link');
      $(`a[href=${e.target.hash}]`).addClass('is-active-link');
      $(e.target.hash).scrollIntoView();
      return false;
    }
  });
</script>


<script>
  var ayerConfig = {
    mathjax: false
  }
</script>


<script src="/js/ayer.js"></script>


<script src="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery-modal@0.9.2/jquery.modal.min.css">


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                        <div class="pswp__preloader__cut">
                            <div class="pswp__preloader__donut"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div>
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.css">
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"></script>

<script>
    function viewer_init() {
        let pswpElement = document.querySelectorAll('.pswp')[0];
        let $imgArr = document.querySelectorAll(('.article-entry img:not(.reward-img)'))

        $imgArr.forEach(($em, i) => {
            $em.onclick = () => {
                // slider展开状态
                // todo: 这样不好，后面改成状态
                if (document.querySelector('.left-col.show')) return
                let items = []
                $imgArr.forEach(($em2, i2) => {
                    let img = $em2.getAttribute('data-idx', i2)
                    let src = $em2.getAttribute('data-target') || $em2.getAttribute('src')
                    let title = $em2.getAttribute('alt')
                    // 获得原图尺寸
                    const image = new Image()
                    image.src = src
                    items.push({
                        src: src,
                        w: image.width || $em2.width,
                        h: image.height || $em2.height,
                        title: title
                    })
                })
                var gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, {
                    index: parseInt(i)
                });
                gallery.init()
            }
        })
    }
    viewer_init()
</script>




<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>
  </div>
</body>

</html>